<!DOCTYPE html>
<html lang="en">
<head>
[#include "/customer/include/static.htm"]
    <link href="${path }/resources/css/loan.css?v=1.4" rel="stylesheet" type="text/css"/>
<body>
<!--头部-->
[#include "/customer/include/header.ftl"]
<div class="invest_search" id="new_list" style="margin-top: 20px">
    <ul>
        <!--<li>
            <span class="fleft" style="color:#999;">借款种类：</span>
         <span class="fleft" id="a">
            <a class="on 0" href="javascript:void(0)" active="a" value="" name="loan_category" onclick="searchbtn('loan_category','')">不限</a>
		    <a href="javascript:void(0)" class="1" active="a" value="10" name="loan_category" onclick="searchbtn('loan_category','10')">秒还标</a>
            <a href="javascript:void(0)" class="2" active="a" value="2" name="loan_category" onclick="searchbtn('loan_category','2')">抵押标</a>
            <a href="javascript:void(0)" class="5" active="a" value="11" name="loan_category" onclick="searchbtn('loan_category','11')">信用标</a>
          </span>
        </li>-->
        <li>

            <span class="fleft" style="color:#999;">利率范围：</span>
         <span class="fleft" id="b">

             <a class="on 0" href="javascript:void(0)" active="b" value="0" name="rates" onclick="searchbtn('rates','','')">不限</a>
             <a href="javascript:void(0)" active="b" class="1" value="-5" name="rates"  onclick="searchbtn('rates','0','5')">5%以下</a>
             <a href="javascript:void(0)" active="b" class="2" value="5-10" name="rates"  onclick="searchbtn('rates','5','10')">5%-10%</a>
             <a href="javascript:void(0)" active="b" class="3" value="10-18" name="rates"  onclick="searchbtn('rates','10','18')">10%-18%</a>
             <a href="javascript:void(0)" active="b" class="4" value="18-" name="rates"  onclick="searchbtn('rates','18','')">18%以上</a>

         </span>
        </li>
        <li><span class="fleft" style="color:#999;" active="c">借款期限：</span>
         <span class="fleft" id="c">

            <a class="on 0" href="javascript:void(0)" active="c" value="0" name="time_limit"  onclick="searchbtn('time_limit','','')">不限</a>
            <a href="javascript:void(0)" class="1" active="c" value="-1" name="time_limit"  onclick="searchbtn('time_limit','0','1')">1个月以下</a>
            <a href="javascript:void(0)" class="2" active="c"     value="1-3" name="time_limit"  onclick="searchbtn('time_limit','1','3')">1-3个月</a>
            <a href="javascript:void(0)" class="3" active="c" value="3-12" name="time_limit"  onclick="searchbtn('time_limit','3','12')">3-12月</a>

             <a href="javascript:void(0)" class="4" active="c" value="12-" name="time_limit"  onclick="searchbtn('time_limit','12','')">12月以上</a>

         </span>
        </li>
        <li><span class="fleft" style="color:#999;">还款方式：</span>
         <span class="v" id="d">
            <a class="on" href="javascript:void(0)" active="d" value="" name="pay_style" onclick="searchbtn('pay_style','','')">不限</a>
            <a href="javascript:void(0)" active="d" value="0"  name="pay_style" onclick="searchbtn('pay_style','0','')">一次性还本息</a>
            <a href="javascript:void(0)" active="d" value="3"  name="pay_style" onclick="searchbtn('pay_style','3','')">按月付息到期还本</a>
            <a href="javascript:void(0)" active="d" value="5"   name="pay_style"onclick="searchbtn('pay_style','5','')" >等本等息</a>
          </span>
        </li>

    </ul>
</div>
<div class="invest_px" style=" background:#fcfcfc;">
    <div class="fleft">
        <span>排序：</span>
		<span>
        	<a class="searchbtn" href="javascript:void(0)" value="0" onclick="searchbtn(this,'rates')" title="利率">利率<font></font></a>
         </span>
         <span>
         	<a class="searchbtn on" href="javascript:void(0)" value="1" onclick="searchbtn(this,'money')" title="金额">金额<font>↓</font></a>
         </span>
         <span>
         	<a class="searchbtn" href="javascript:void(0)" value="0" onclick="searchbtn(this,'surplus')" title="进度">进度<font></font></a>
         </span>
         <span>
         	<a class="searchbtn" href="javascript:void(0)" value="0" onclick="searchbtn(this,'deadline')" title="期限">期限<font></font></a>
         </span>
    </div>
</div>
<div class="row loan_ajax">



</div>



<script type="text/javascript">
    $(function(){
        //初始化
        $.ajax({
            type: "POST",
            url: "/bid/loanAjax",
            success: function(msg){
                $(".loan_ajax").html(msg).fadeIn(200);
                $(".top_invest_wrap clearfix").animate({left:'250px'});

            }
        });
        $('#new_list li a').click(function(){
            var active=$(this).attr("active");
            var name=$(this).attr("name");
            $('#'+name).val($(this).attr("value"));
            $('#'+active+' a').removeClass("on");
            $(this).addClass("on");
        });


    })
    //排序
    function searchbtn(type,begin,end){
        console.log("type:"+type+",begin:"+begin+",end:"+end);
        var active=$(this).attr("active");
        var name=$(this).attr("name");
        $('#'+name).val($(this).attr("value"));
        $('#'+active+' a').removeClass("on");
        $(this).addClass("on");
        if(type=='rates'){
            $("input[name='rateBegin']").val(begin == "" ? "" : begin);
            $("input[name='rateEnd']").val(end == "" ? "" : end);
        }else if(type=='loan_category'){
            $("input[name='loanCategory']").val(begin);
        }else if(type=='pay_style'){
            $("input[name='pay_style']").val(begin);
        }
        else if(type=='time_limit'){
            $("input[name='timeLimitBegin']").val(begin == "" ? "" : begin);
            $("input[name='timeLimitEnd']").val(end == "" ? "" : end);
        }
        page_search_go2(1);
    }

    function  ondataCallBack(msg){
        $(".loan_ajax").html(msg);
    }

</script>



[#include "/customer/include/footer.ftl"]



</body>

</html>